function [position,isterminal,direction] =Angle0(t,S,GM_central,u,DU,VU)
pos = [S(1:2);0];
vel = [S(3:4);0];


S_i_crtbp = [pos;vel];
S_i_inert = C2I_new(S_i_crtbp,u,DU,VU,t);

COE = State2Coe(S_i_inert,GM_central);


position = COE(6)-180.000001;
if S(1)>0.6

isterminal = 0;
else
isterminal = 1;

end
direction = 0;   